<?php

namespace App\Model;

use PhalApi\Model\DataModel;
use PhalApi\Model\NotORMModel as NotORM;

class Mir4GetUI extends DataModel
{

    protected function getTableName($id)
    {
        return 'game_mir4';
    }

    //取UI
    public function Mir4GetUI( $data )
    {
        //按条件取UI
        $Record = $this->getORM()->select('*')->where( $data )->fetchOne();
        if ( $Record ){
            return $Record;
        }
        $data['create_time'] = date("Y-m-d H:i:s",time());
        return $this->getORM()->insert( $data );
    }


}
